package org.chen.wordwave.act;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import org.chen.wordwave.R;
import org.chen.wordwave.base.BaseActivity;

public class AboutMe extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public Integer getLayoutResId() {
        return R.layout.about_me_act;
    }

    @Override
    public void init() {
        Button btnContactDeveloper = findViewById(R.id.btn_contact_developer);
        btnContactDeveloper.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 创建一个Intent来发送电子邮件
                Intent emailIntent = new Intent(Intent.ACTION_SENDTO);
                emailIntent.setData(Uri.parse("mailto:xchen6367@gmail.com")); // 设置开发者的电子邮件地址
                emailIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.wordmaster_email)); // 设置电子邮件主题
                if (emailIntent.resolveActivity(getPackageManager()) != null) {
                    startActivity(emailIntent);
                }
            }
        });
    }
}
